package com.yxw.yxnet_cd_center.customer_service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxw.yxnet_cd_center.customer_service.entity.YxCsChannelStatisticsEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author fangmaoxin
 * @version 1.0
 * @date 2023年9月17日
 * 菜单管理 mapper
 */
public interface ChannelStatisticsMapper extends BaseMapper<YxCsChannelStatisticsEntity> {

    @Select("SELECT statistics_id,channel_id,channel_code,channel_name,day_consult_cnt,his_consult_cnt,day_handle_rate,his_handle_rate,active_rate,create_time,update_time,p_day " +
            "FROM yx_cs_channel_statistics " +
            "WHERE (channel_name = #{channelName} AND create_time BETWEEN #{createTimeStart} AND #{createTimeEnd}) " +
            "ORDER BY create_time DESC")
    List<YxCsChannelStatisticsEntity> selectExportExcelList(@Param("channelName") String channelName, @Param("createTimeStart") String createTimeStart, @Param("createTimeEnd") String createTimeEnd);

}
